blob: 9030fac76ce8f61dd5504b846e69f2c9f4dbc381 [file] [log] [blame]
Yuxuan 'fishy' Wangec4b06a2013-10-14 12:39:30 -07001Gerrit Code Review - /Documentation/ REST API
2=============================================
3
4This page describes the documentation search related REST endpoints.
5Please also take note of the general information on the
6link:rest-api.html[REST API].
7
8Please note that this feature is only usable with documentation built-in.
9You'll need to
10`buck build :withdocs`
11or
12`buck build :release`
13to test this feature.
14
15[[documentation-endpoints]]
16Documentation Search Endpoints
17------------------------------
18
19[[search-documentation]]
20Search Documentation
21~~~~~~~~~~~~~~~~~~~~
22[verse]
23'GET /Documentation/'
24
25With `q` parameter, search our documentation index for the terms.
26
27A list of link:#doc-result[DocResult] entities is returned describing the
28results.
29
30.Request
31----
32 GET /Documentation/?q=test HTTP/1.0
33----
34
35.Response
36----
37 HTTP/1.1 200 OK
38 Content-Disposition: attachment
39 Content-Type: application/json; charset=UTF-8
40
41 )]}'
42 [
43 {
44 "title": "Gerrit Code Review - REST API Developers\u0027 Notes",
45 "url": "Documentation/dev-rest-api.html"
46 },
47 {
48 "title": "Gerrit Code Review - REST API",
49 "url": "Documentation/rest-api.html"
50 },
51 {
52 "title": "Gerrit Code Review - JavaScript API",
53 "url": "Documentation/js-api.html"
54 },
55 {
56 "title": "Gerrit Code Review - /plugins/ REST API",
57 "url": "Documentation/rest-api-plugins.html"
58 },
59 {
60 "title": "Gerrit Code Review - /config/ REST API",
61 "url": "Documentation/rest-api-config.html"
62 },
63 {
64 "title": "Gerrit Code Review for Git",
65 "url": "Documentation/index.html"
66 },
67 {
68 "title": "Gerrit Code Review - /access/ REST API",
69 "url": "Documentation/rest-api-access.html"
70 },
71 {
72 "title": "Gerrit Code Review - Plugin Development",
73 "url": "Documentation/dev-plugins.html"
74 },
75 {
76 "title": "Gerrit Code Review - Developer Setup",
77 "url": "Documentation/dev-readme.html"
78 },
79 {
80 "title": "Gerrit Code Review - Hooks",
81 "url": "Documentation/config-hooks.html"
82 },
83 {
84 "title": "Change Screen - Introduction",
85 "url": "Documentation/intro-change-screen.html"
86 },
87 {
88 "title": "Gerrit Code Review - /groups/ REST API",
89 "url": "Documentation/rest-api-groups.html"
90 },
91 {
92 "title": "Gerrit Code Review - /accounts/ REST API",
93 "url": "Documentation/rest-api-accounts.html"
94 },
95 {
96 "title": "Gerrit Code Review - /projects/ REST API",
97 "url": "Documentation/rest-api-documentation.html"
98 },
99 {
100 "title": "Gerrit Code Review - /projects/ REST API",
101 "url": "Documentation/rest-api-projects.html"
102 },
103 {
104 "title": "Gerrit Code Review - Prolog Submit Rules Cookbook",
105 "url": "Documentation/prolog-cookbook.html"
106 },
107 {
108 "title": "Gerrit Code Review - /changes/ REST API",
109 "url": "Documentation/rest-api-changes.html"
110 },
111 {
112 "title": "Gerrit Code Review - Configuration",
113 "url": "Documentation/config-gerrit.html"
114 },
115 {
116 "title": "Gerrit Code Review - Access Controls",
117 "url": "Documentation/access-control.html"
118 },
119 {
120 "title": "Gerrit Code Review - Licenses",
121 "url": "Documentation/licenses.html"
122 }
123 ]
124----
125
126.Query documentation
127****
128get::/Documentation/?q=keyword
129****
130
131
132[[json-entities]]
133JSON Entities
134-------------
135
136[[doc-result]]
137DocResult
138~~~~~~~~~
139The `DocResult` entity contains information about a document.
140
141[options="header",width="50%",cols="1,^2,4"]
142|=========================
143|Field Name ||Description
144|`title` ||The title of the document.
145|`url` ||The URL of the document.
146|=========================
147
148
149GERRIT
150------
151Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -0700152
153SEARCHBOX
154---------